package tank.client.game;

import java.awt.*;


/**
 * 子弹类
 */
public class Bullet{

    public static final int WIDTH = 6;
    public static final int HEIGHT = 6;
    //x坐标
    private int x;
    //y坐标
    private int y;
    //方向
    private int direction;
    //颜色
    private Color color;
    //速度
    private int speed = 10;
    //是否删除
    private boolean removed;

    public Bullet(int x, int y, int direction) {
        this.x = x;
        this.y = y;
        this.direction = direction;
    }

    public Bullet(int x, int y, int direction, Color color) {
        this(x,y,direction);
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getDirection() {
        return direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public boolean isRemoved() {
        return removed;
    }

    public void setRemoved(boolean removed) {
        this.removed = removed;
    }

}
